<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const myImg = (function () {
            let imgNode = document.createElement('img');
            document.body.appendChild(imgNode);

            return {
                setSrc(src) {
                    imgNode.src = src;
                }
            }
        })()

        const proxyImage = (function () {
            let img = new Image();
            img.onload = function () {
                myImg.setSrc(this.src);
            }

            return {
                setSrc(src){
                    myImg.setSrc('../表情包/01.png'),
                    img.src = src;
                }
            }
        })()

        proxyImage.setSrc('https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1705581946,4177791147&fm=26&gp=0.jpg');
    </script>
</body>

</html>